package org.example.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@io.grpc.stub.annotations.GrpcGenerated
public final class TestFirstServiceGrpc {

  private TestFirstServiceGrpc() {}

  public static final java.lang.String SERVICE_NAME = "org.example.grpc.TestFirstService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "helloWorld",
      requestType = org.example.model.TestProto.RequestData.class,
      responseType = org.example.model.TestProto.ResponseData.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldMethod() {
    io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData> getHelloWorldMethod;
    if ((getHelloWorldMethod = TestFirstServiceGrpc.getHelloWorldMethod) == null) {
      synchronized (TestFirstServiceGrpc.class) {
        if ((getHelloWorldMethod = TestFirstServiceGrpc.getHelloWorldMethod) == null) {
          TestFirstServiceGrpc.getHelloWorldMethod = getHelloWorldMethod =
              io.grpc.MethodDescriptor.<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "helloWorld"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.RequestData.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.ResponseData.getDefaultInstance()))
              .setSchemaDescriptor(new TestFirstServiceMethodDescriptorSupplier("helloWorld"))
              .build();
        }
      }
    }
    return getHelloWorldMethod;
  }

  private static volatile io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldBySSEMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "helloWorldBySSE",
      requestType = org.example.model.TestProto.RequestData.class,
      responseType = org.example.model.TestProto.ResponseData.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldBySSEMethod() {
    io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData> getHelloWorldBySSEMethod;
    if ((getHelloWorldBySSEMethod = TestFirstServiceGrpc.getHelloWorldBySSEMethod) == null) {
      synchronized (TestFirstServiceGrpc.class) {
        if ((getHelloWorldBySSEMethod = TestFirstServiceGrpc.getHelloWorldBySSEMethod) == null) {
          TestFirstServiceGrpc.getHelloWorldBySSEMethod = getHelloWorldBySSEMethod =
              io.grpc.MethodDescriptor.<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "helloWorldBySSE"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.RequestData.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.ResponseData.getDefaultInstance()))
              .setSchemaDescriptor(new TestFirstServiceMethodDescriptorSupplier("helloWorldBySSE"))
              .build();
        }
      }
    }
    return getHelloWorldBySSEMethod;
  }

  private static volatile io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldByClientStreamRpcMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "helloWorldByClientStreamRpc",
      requestType = org.example.model.TestProto.RequestData.class,
      responseType = org.example.model.TestProto.ResponseData.class,
      methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
  public static io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldByClientStreamRpcMethod() {
    io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData> getHelloWorldByClientStreamRpcMethod;
    if ((getHelloWorldByClientStreamRpcMethod = TestFirstServiceGrpc.getHelloWorldByClientStreamRpcMethod) == null) {
      synchronized (TestFirstServiceGrpc.class) {
        if ((getHelloWorldByClientStreamRpcMethod = TestFirstServiceGrpc.getHelloWorldByClientStreamRpcMethod) == null) {
          TestFirstServiceGrpc.getHelloWorldByClientStreamRpcMethod = getHelloWorldByClientStreamRpcMethod =
              io.grpc.MethodDescriptor.<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "helloWorldByClientStreamRpc"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.RequestData.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.ResponseData.getDefaultInstance()))
              .setSchemaDescriptor(new TestFirstServiceMethodDescriptorSupplier("helloWorldByClientStreamRpc"))
              .build();
        }
      }
    }
    return getHelloWorldByClientStreamRpcMethod;
  }

  private static volatile io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldByWebSocketMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "helloWorldByWebSocket",
      requestType = org.example.model.TestProto.RequestData.class,
      responseType = org.example.model.TestProto.ResponseData.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData,
      org.example.model.TestProto.ResponseData> getHelloWorldByWebSocketMethod() {
    io.grpc.MethodDescriptor<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData> getHelloWorldByWebSocketMethod;
    if ((getHelloWorldByWebSocketMethod = TestFirstServiceGrpc.getHelloWorldByWebSocketMethod) == null) {
      synchronized (TestFirstServiceGrpc.class) {
        if ((getHelloWorldByWebSocketMethod = TestFirstServiceGrpc.getHelloWorldByWebSocketMethod) == null) {
          TestFirstServiceGrpc.getHelloWorldByWebSocketMethod = getHelloWorldByWebSocketMethod =
              io.grpc.MethodDescriptor.<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "helloWorldByWebSocket"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.RequestData.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.example.model.TestProto.ResponseData.getDefaultInstance()))
              .setSchemaDescriptor(new TestFirstServiceMethodDescriptorSupplier("helloWorldByWebSocket"))
              .build();
        }
      }
    }
    return getHelloWorldByWebSocketMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static TestFirstServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceStub>() {
        @java.lang.Override
        public TestFirstServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TestFirstServiceStub(channel, callOptions);
        }
      };
    return TestFirstServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports all types of calls on the service
   */
  public static TestFirstServiceBlockingV2Stub newBlockingV2Stub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceBlockingV2Stub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceBlockingV2Stub>() {
        @java.lang.Override
        public TestFirstServiceBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TestFirstServiceBlockingV2Stub(channel, callOptions);
        }
      };
    return TestFirstServiceBlockingV2Stub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static TestFirstServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceBlockingStub>() {
        @java.lang.Override
        public TestFirstServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TestFirstServiceBlockingStub(channel, callOptions);
        }
      };
    return TestFirstServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static TestFirstServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<TestFirstServiceFutureStub>() {
        @java.lang.Override
        public TestFirstServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TestFirstServiceFutureStub(channel, callOptions);
        }
      };
    return TestFirstServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     */
    default void helloWorld(org.example.model.TestProto.RequestData request,
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHelloWorldMethod(), responseObserver);
    }

    /**
     */
    default void helloWorldBySSE(org.example.model.TestProto.RequestData request,
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHelloWorldBySSEMethod(), responseObserver);
    }

    /**
     */
    default io.grpc.stub.StreamObserver<org.example.model.TestProto.RequestData> helloWorldByClientStreamRpc(
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHelloWorldByClientStreamRpcMethod(), responseObserver);
    }

    /**
     */
    default io.grpc.stub.StreamObserver<org.example.model.TestProto.RequestData> helloWorldByWebSocket(
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHelloWorldByWebSocketMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service TestFirstService.
   */
  public static abstract class TestFirstServiceImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return TestFirstServiceGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service TestFirstService.
   */
  public static final class TestFirstServiceStub
      extends io.grpc.stub.AbstractAsyncStub<TestFirstServiceStub> {
    private TestFirstServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TestFirstServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TestFirstServiceStub(channel, callOptions);
    }

    /**
     */
    public void helloWorld(org.example.model.TestProto.RequestData request,
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getHelloWorldMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void helloWorldBySSE(org.example.model.TestProto.RequestData request,
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getHelloWorldBySSEMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public io.grpc.stub.StreamObserver<org.example.model.TestProto.RequestData> helloWorldByClientStreamRpc(
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
          getChannel().newCall(getHelloWorldByClientStreamRpcMethod(), getCallOptions()), responseObserver);
    }

    /**
     */
    public io.grpc.stub.StreamObserver<org.example.model.TestProto.RequestData> helloWorldByWebSocket(
        io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData> responseObserver) {
      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
          getChannel().newCall(getHelloWorldByWebSocketMethod(), getCallOptions()), responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service TestFirstService.
   */
  public static final class TestFirstServiceBlockingV2Stub
      extends io.grpc.stub.AbstractBlockingStub<TestFirstServiceBlockingV2Stub> {
    private TestFirstServiceBlockingV2Stub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TestFirstServiceBlockingV2Stub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TestFirstServiceBlockingV2Stub(channel, callOptions);
    }

    /**
     */
    public org.example.model.TestProto.ResponseData helloWorld(org.example.model.TestProto.RequestData request) throws io.grpc.StatusException {
      return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
          getChannel(), getHelloWorldMethod(), getCallOptions(), request);
    }

    /**
     */
    @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
    public io.grpc.stub.BlockingClientCall<?, org.example.model.TestProto.ResponseData>
        helloWorldBySSE(org.example.model.TestProto.RequestData request) {
      return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall(
          getChannel(), getHelloWorldBySSEMethod(), getCallOptions(), request);
    }

    /**
     */
    @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
    public io.grpc.stub.BlockingClientCall<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>
        helloWorldByClientStreamRpc() {
      return io.grpc.stub.ClientCalls.blockingClientStreamingCall(
          getChannel(), getHelloWorldByClientStreamRpcMethod(), getCallOptions());
    }

    /**
     */
    @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
    public io.grpc.stub.BlockingClientCall<org.example.model.TestProto.RequestData, org.example.model.TestProto.ResponseData>
        helloWorldByWebSocket() {
      return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
          getChannel(), getHelloWorldByWebSocketMethod(), getCallOptions());
    }
  }

  /**
   * A stub to allow clients to do limited synchronous rpc calls to service TestFirstService.
   */
  public static final class TestFirstServiceBlockingStub
      extends io.grpc.stub.AbstractBlockingStub<TestFirstServiceBlockingStub> {
    private TestFirstServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TestFirstServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TestFirstServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public org.example.model.TestProto.ResponseData helloWorld(org.example.model.TestProto.RequestData request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getHelloWorldMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator<org.example.model.TestProto.ResponseData> helloWorldBySSE(
        org.example.model.TestProto.RequestData request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getHelloWorldBySSEMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service TestFirstService.
   */
  public static final class TestFirstServiceFutureStub
      extends io.grpc.stub.AbstractFutureStub<TestFirstServiceFutureStub> {
    private TestFirstServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TestFirstServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TestFirstServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<org.example.model.TestProto.ResponseData> helloWorld(
        org.example.model.TestProto.RequestData request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getHelloWorldMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_HELLO_WORLD = 0;
  private static final int METHODID_HELLO_WORLD_BY_SSE = 1;
  private static final int METHODID_HELLO_WORLD_BY_CLIENT_STREAM_RPC = 2;
  private static final int METHODID_HELLO_WORLD_BY_WEB_SOCKET = 3;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_HELLO_WORLD:
          serviceImpl.helloWorld((org.example.model.TestProto.RequestData) request,
              (io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData>) responseObserver);
          break;
        case METHODID_HELLO_WORLD_BY_SSE:
          serviceImpl.helloWorldBySSE((org.example.model.TestProto.RequestData) request,
              (io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_HELLO_WORLD_BY_CLIENT_STREAM_RPC:
          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.helloWorldByClientStreamRpc(
              (io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData>) responseObserver);
        case METHODID_HELLO_WORLD_BY_WEB_SOCKET:
          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.helloWorldByWebSocket(
              (io.grpc.stub.StreamObserver<org.example.model.TestProto.ResponseData>) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getHelloWorldMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.example.model.TestProto.RequestData,
              org.example.model.TestProto.ResponseData>(
                service, METHODID_HELLO_WORLD)))
        .addMethod(
          getHelloWorldBySSEMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              org.example.model.TestProto.RequestData,
              org.example.model.TestProto.ResponseData>(
                service, METHODID_HELLO_WORLD_BY_SSE)))
        .addMethod(
          getHelloWorldByClientStreamRpcMethod(),
          io.grpc.stub.ServerCalls.asyncClientStreamingCall(
            new MethodHandlers<
              org.example.model.TestProto.RequestData,
              org.example.model.TestProto.ResponseData>(
                service, METHODID_HELLO_WORLD_BY_CLIENT_STREAM_RPC)))
        .addMethod(
          getHelloWorldByWebSocketMethod(),
          io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
            new MethodHandlers<
              org.example.model.TestProto.RequestData,
              org.example.model.TestProto.ResponseData>(
                service, METHODID_HELLO_WORLD_BY_WEB_SOCKET)))
        .build();
  }

  private static abstract class TestFirstServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    TestFirstServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return org.example.grpc.TestServiceProto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("TestFirstService");
    }
  }

  private static final class TestFirstServiceFileDescriptorSupplier
      extends TestFirstServiceBaseDescriptorSupplier {
    TestFirstServiceFileDescriptorSupplier() {}
  }

  private static final class TestFirstServiceMethodDescriptorSupplier
      extends TestFirstServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    TestFirstServiceMethodDescriptorSupplier(java.lang.String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (TestFirstServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new TestFirstServiceFileDescriptorSupplier())
              .addMethod(getHelloWorldMethod())
              .addMethod(getHelloWorldBySSEMethod())
              .addMethod(getHelloWorldByClientStreamRpcMethod())
              .addMethod(getHelloWorldByWebSocketMethod())
              .build();
        }
      }
    }
    return result;
  }
}
